package ink.metoo.auto.fishpi.job

import ink.metoo.auto.fishpi.Settings
import ink.metoo.auto.fishpi.call.ArticleCall


class AutoCommentTagArticleJob : RunnableJob {

    override fun run() {
        Settings.community.watchTags.forEach { tag ->

            val data = ArticleCall.getArticlesByTag(tag = tag, size = 1).data ?: return@forEach
            data.articles.forEach { article ->
                AutoCommentArticleJob.tryComment(article.oId)
            }

        }
    }


}